const { series, parallel } = require('gulp');
//  series依次执行任务
//  parallel并行执行任务

const task1 = done => {
    setTimeout(() => {
        console.log('第一个任务被执行了');
        done();
    }, 1000);
}

const task2 = done => {
    setTimeout(() => {
        console.log('第二个任务被执行了');
        done();
    }, 1000);
}

const task3 = done => {
    setTimeout(() => {
        console.log('第三个任务被执行了');
        done();
    }, 1000);
}

exports.foo = series(task1, task2, task3);

exports.bar = parallel(task1, task2, task3);